package suray.rgv.communication.data.status;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 读取到的两栖车IO数据
 */
@NoArgsConstructor
@Data
public class RobotIO {
    @JsonProperty("DI")
    private List<DIDTO> di;
    @JsonProperty("DO")
    private List<DODTO> DO;
    @JsonProperty("ret_code")
    private Integer retCode;

    @NoArgsConstructor
    @Data
    public static class DIDTO {
        @JsonProperty("id")
        private Integer id;
        @JsonProperty("source")
        private String source;
        @JsonProperty("status")
        private Boolean status;
        @JsonProperty("valid")
        private Boolean valid;
    }

    @NoArgsConstructor
    @Data
    public static class DODTO {
        @JsonProperty("id")
        private Integer id;
        @JsonProperty("source")
        private String source;
        @JsonProperty("status")
        private Boolean status;
    }
}
